/**
 * This class contains unit tests for validating the behavior of Apex classes
 * and triggers.
 *
 * Unit tests are class methods that verify whether a particular piece
 * of code is working properly. Unit test methods take no arguments,
 * commit no data to the database, and are flagged with the testMethod
 * keyword in the method definition.
 *
 * All test methods in an organization are executed whenever Apex code is deployed
 * to a production organization to confirm correctness, ensure code
 * coverage, and prevent regressions. All Apex classes are
 * required to have at least 75% code coverage in order to be deployed
 * to a production organization. In addition, all triggers must have some code coverage.
 * 
 * The @isTest class annotation indicates this class only contains test
 * methods. Classes defined with the @isTest annotation do not count against
 * the organization size limit for all Apex scripts.
 *
 * See the Apex Language Reference for more information about Testing and Code Coverage.
 */
@isTest
private class CustomAccountLookupController_Test 
{

    static testMethod void myUnitTest() 
    {
        //Test Data 
        
        Account acc = new Account();
        acc.Name = 'Test';
        insert acc;
        
        
        Emirates__c emiratesObject = new Emirates__c();
        emiratesObject.Name = 'Test';
        emiratesObject.Active__c = true;
        emiratesObject.E_form_code__c = 'Test';
        insert emiratesObject;
        
        City__c cityObject = new City__c();
        cityObject.Name = 'Test';
        cityObject.Active__c = true;
        cityObject.E_form_code__c = 'Test';
        cityObject.Emirates__c  = emiratesObject.Id;
        insert cityObject;
        
        Area__c areaObject = new Area__c();
        areaObject.Name = 'Test';
        areaObject.Active__c = true;
        areaObject.E_form_code__c = 1;
        areaObject.City__c = cityObject.Id;
        insert areaObject;
        
        Country__c Countries = new Country__c();
        Countries.Name = 'Test';
        Countries.eFormCode__c = 'Test';
        Countries.IsActive__c = true;
        insert COuntries;
        
        
        CountriesList__c CountriesList = new CountriesList__c();
        CountriesList.Name = 'Test';
        CountriesList.IsActive__c = true;
        CountriesList.eFormCode__c = 'Test';
        insert CountriesList;
        
        Occupation__c OCP = new Occupation__c();
        OCP.Name = 'Test';
        OCP.IsActive__c = true;
        OCP.eFormCode__c = 'Test';
        insert OCP;
        
        
        Occupation__c OCP1 = new Occupation__c();
        OCP1.Name = 'Test1';
        OCP1.IsActive__c = true;
        OCP1.eFormCode__c = 'Test1';
        
        //Testing Start...
		ApexPages.CurrentPage().getParameters().put('lksrch', OCP.Name);
		CustomAccountLookupController referenceObject = new CustomAccountLookupController();
        referenceObject.search();
        referenceObject.getTextBox();
        referenceObject.getFormTag();
        referenceObject.occupation = OCP1;
        referenceObject.saveOccupation();
        
    }
}